import { useNotification } from "@/stores/useNotification";
import { JsonMsg } from "../types/SocketData";

export const handleJsonMsg = (jsonMsg: JsonMsg) => {
    const notificationStore = useNotification();
    switch (jsonMsg.msgtype) {
        case "alarm": {
            notificationStore.addNotice({ id: Date.now().toString(), title: jsonMsg.msginfo, date: Date.now(), state: 0 }, true);
        }
    }
};
